package day11.problem3;

//过河卒
//https://www.nowcoder.com/practice/cc1a9bc523a24716a117b438a1dc5706?tpId=230&tqId=40428&ru=/exam/oj

import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();
        int[] xx = {-2, -1, 1, 2, 2,  1,  -1, -2};
        int[] yy = {1,   2, 2, 1, -1, -2, -2, -1};
        List<int[]> list = new ArrayList<>();
        for(int i = 0; i<8; i++) {
            int dx = x + xx[i], dy = y + yy[i];
            list.add(new int[]{dx, dy});
            // System.out.println(dx + " " + dy);
        }
        list.add(new int[]{x, y});

        long[][] dp = new long[n+2][m+2];
        dp[1][0] = 1;
        for(int i = 1; i<=n+1; i++) {
            for(int j = 1; j<=m+1; j++) {
                if(check(list, i-1,j-1)) dp[i][j] = 0;
                else dp[i][j] = dp[i-1][j] + dp[i][j-1];
                // System.out.print(dp[i][j] + " " );
            }
            // System.out.println();
        }
        System.out.println(dp[n+1][m+1]);
    }

    private static boolean check(List<int[]> list, int x, int y) {
        for(int[] t : list) {
            if(t[0] == x && t[1] == y) return true;
        }
        return false;
    }
}